<script setup lang="ts">
import { Cell, Edge } from 'pack-antv-x6';
import Main from '../main';


const props = defineProps<{main:Main,cell:Cell}>()

const {main,cell} = props;

const handleDel = () => {
    cell.isNode() ? main.nodeRemove(cell) : main.edgeRemove(cell as Edge)
}

</script>

<template>
    <div class="flex flex-col c-#163D5C">
        <div class="flex items-center justify-between gap-2 p-x-2 p-y-1 _btn" @click="handleDel">
            <div class="i-mingcute:delete-3-line w-1em h-1em"></div>
            <div>删除</div>
        </div>
        
    </div>
</template>